<!--
Amilcar de León
Mayo 30, 2011
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Listado de "Jokes"-->>Data</title>
    </head>
    <body>
        <p>Listado de Jokes:</p>
<!-- Agregamos link de "Agregar nuevo registro-->
            <p><a href="?addjoke">Ingresar Nuevo Registro</a></p>

<!--desplegamos listado de data, con botón de eliminar incluido-->
        <?php foreach ($jokes as $joke):?>
        <form action="?deletejoke" method="post">
        <blockquote
            <p>
                <?php echo htmlspecialchars ($joke['text'], ENT_QUOTES,
                        'UTF-8');?>
                <input type="hidden" name="id" value="<?php
                echo $joke['id'];?>"/>
                <input type="submit" value="Delete"/>
                (by <a href="mailto:<?php
                echo htmlspecialchars($joke['email'], ENT_QUOTES,
                        'UTF-8'); ?>"><?php
                        echo htmlspecialchars($joke['name'], ENT_QUOTES,
                                'UTF-8'); ?></a>"
            </p>
        </blockquote>
    </form>
        <?php        endforeach;
include_once $_SERVER['DOCUMENT_ROOT'].'/PHPLearning2011/totaljokes-error/totaljokes-function.inc.php';
$jokestotal=totaljokes();
echo "Tenemos " . $jokestotal. " registros en total";
        include_once $_SERVER['DOCUMENT_ROOT'] . '/PHPLearning2011/static-footer/footer.inc.html.php';
        ?>

    </body>
</html>
